package com.testdemo.web.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.testdemo.web.dao.RecordDao;
import com.testdemo.web.vo.RecentRangement;
import com.testdemo.web.vo.WeekSummary;


@Service
public class RecordServiceImpl implements RecordService {
	@Autowired
	private RecordDao recordDao;
	
	
	@Override
	public int addRecentArrangement(RecentRangement recentRangement) {
		
		return recordDao.addRecentArrangement(recentRangement);
	}


	@Override
	public List<RecentRangement> getaddRecentArrangementByName(String name) {
		return recordDao.getRecentArrangementByUsername(name);
	}


	@Override
	public RecentRangement getRecentRangementById(Integer id) {
		
		return recordDao.selectRecentArrangementById(id);
	}


	@Override
	public Integer deleteRecentRangementById(Integer id) {
		
		return recordDao.deleteRecentArrangementById(id);
	}



	@Override
	public int addWeekSummary(WeekSummary weekSummary) {
		return recordDao.insertWeekSummary(weekSummary);
	}


	@Override
	public List<WeekSummary> getAllSummaryByUsername(String username) {
		return recordDao.selectAllWeekSummaryByUsername(username);
	}



}
